<?php
declare(strict_types=1);
/*
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-29 01:12:30
 * @lastTime 2020-04-29 01:13:30
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Test\Unit;

use Design\Behavioral\TemplateMethod\CityJourney;
use Design\Behavioral\TemplateMethod\BeachJourney;

class TemplateMethodTest extends \Test\BaseTest
{


    public function testCanGetOnVacationOnTheBeach()
    {
        $beachJourney = new BeachJourney();
        $beachJourney->takeATrip();

        $this->assertSame(
            [
                'Buy a flight ticket',
                'Taking the plane',
                'Swimming and sun-bathing',
                'Taking the plane',
            ],
            $beachJourney->getThingsToDo()
        );

    }//end testCanGetOnVacationOnTheBeach()


    public function testCanGetOnAJourneyToACity()
    {
        $cityJourney = new CityJourney();
        $cityJourney->takeATrip();

        $this->assertSame(
            [
                'Buy a flight ticket',
                'Taking the plane',
                'Eat, drink, take photos and sleep',
                'Buy a gift',
                'Taking the plane',
            ],
            $cityJourney->getThingsToDo()
        );

    }//end testCanGetOnAJourneyToACity()


}//end class
